<%@page contentType="text/html;charset=UTF-8"%>
<% request.setCharacterEncoding("UTF-8"); %>
<HTML>
<HEAD>
<TITLE>Result</TITLE>
</HEAD>
<BODY>
<H1>Result</H1>

<jsp:useBean id="sampleMobileOffersProxyid" scope="session" class="srv.MobileOffersProxy" />
<%
if (request.getParameter("endpoint") != null && request.getParameter("endpoint").length() > 0)
sampleMobileOffersProxyid.setEndpoint(request.getParameter("endpoint"));
%>

<%
String method = request.getParameter("method");
int methodID = 0;
if (method == null) methodID = -1;

if(methodID != -1) methodID = Integer.parseInt(method);
boolean gotMethod = false;

try {
switch (methodID){ 
case 2:
        gotMethod = true;
        java.lang.String getEndpoint2mtemp = sampleMobileOffersProxyid.getEndpoint();
if(getEndpoint2mtemp == null){
%>
<%=getEndpoint2mtemp %>
<%
}else{
        String tempResultreturnp3 = org.eclipse.jst.ws.util.JspUtils.markup(String.valueOf(getEndpoint2mtemp));
        %>
        <%= tempResultreturnp3 %>
        <%
}
break;
case 5:
        gotMethod = true;
        String endpoint_0id=  request.getParameter("endpoint8");
            java.lang.String endpoint_0idTemp = null;
        if(!endpoint_0id.equals("")){
         endpoint_0idTemp  = endpoint_0id;
        }
        sampleMobileOffersProxyid.setEndpoint(endpoint_0idTemp);
break;
case 10:
        gotMethod = true;
        srv.MobileOffers getMobileOffers10mtemp = sampleMobileOffersProxyid.getMobileOffers();
if(getMobileOffers10mtemp == null){
%>
<%=getMobileOffers10mtemp %>
<%
}else{
%>
<TABLE>
<TR>
<TD COLSPAN="3" ALIGN="LEFT">returnp:</TD>
</TABLE>
<%
}
break;
case 15:
        gotMethod = true;
        java.lang.String getAllBrands15mtemp = sampleMobileOffersProxyid.getAllBrands();
if(getAllBrands15mtemp == null){
%>
<%=getAllBrands15mtemp %>
<%
}else{
        String tempResultreturnp16 = org.eclipse.jst.ws.util.JspUtils.markup(String.valueOf(getAllBrands15mtemp));
        %>
        <%= tempResultreturnp16 %>
        <%
}
break;
case 18:
        gotMethod = true;
        String brandId_1id=  request.getParameter("brandId21");
        int brandId_1idTemp  = Integer.parseInt(brandId_1id);
        java.lang.String getModelsByBrand18mtemp = sampleMobileOffersProxyid.getModelsByBrand(brandId_1idTemp);
if(getModelsByBrand18mtemp == null){
%>
<%=getModelsByBrand18mtemp %>
<%
}else{
        String tempResultreturnp19 = org.eclipse.jst.ws.util.JspUtils.markup(String.valueOf(getModelsByBrand18mtemp));
        %>
        <%= tempResultreturnp19 %>
        <%
}
break;
case 23:
        gotMethod = true;
        String brandId_2id=  request.getParameter("brandId26");
        int brandId_2idTemp  = Integer.parseInt(brandId_2id);
        String modelId_3id=  request.getParameter("modelId28");
        int modelId_3idTemp  = Integer.parseInt(modelId_3id);
        String yearUp_4id=  request.getParameter("yearUp30");
        int yearUp_4idTemp  = Integer.parseInt(yearUp_4id);
        String yearDown_5id=  request.getParameter("yearDown32");
        int yearDown_5idTemp  = Integer.parseInt(yearDown_5id);
        String priceUp_6id=  request.getParameter("priceUp34");
        double priceUp_6idTemp  = Double.parseDouble(priceUp_6id);
        String priceDown_7id=  request.getParameter("priceDown36");
        double priceDown_7idTemp  = Double.parseDouble(priceDown_7id);
        java.lang.String getOffersByFilter23mtemp = sampleMobileOffersProxyid.getOffersByFilter(brandId_2idTemp,modelId_3idTemp,yearUp_4idTemp,yearDown_5idTemp,priceUp_6idTemp,priceDown_7idTemp);
if(getOffersByFilter23mtemp == null){
%>
<%=getOffersByFilter23mtemp %>
<%
}else{
        String tempResultreturnp24 = org.eclipse.jst.ws.util.JspUtils.markup(String.valueOf(getOffersByFilter23mtemp));
        %>
        <%= tempResultreturnp24 %>
        <%
}
break;
case 38:
        gotMethod = true;
        String brandId_8id=  request.getParameter("brandId41");
        int brandId_8idTemp  = Integer.parseInt(brandId_8id);
        String modelId_9id=  request.getParameter("modelId43");
        int modelId_9idTemp  = Integer.parseInt(modelId_9id);
        String year_10id=  request.getParameter("year45");
        int year_10idTemp  = Integer.parseInt(year_10id);
        String price_11id=  request.getParameter("price47");
        double price_11idTemp  = Double.parseDouble(price_11id);
        String contact_12id=  request.getParameter("contact49");
            java.lang.String contact_12idTemp = null;
        if(!contact_12id.equals("")){
         contact_12idTemp  = contact_12id;
        }
        sampleMobileOffersProxyid.insertOffer(brandId_8idTemp,modelId_9idTemp,year_10idTemp,price_11idTemp,contact_12idTemp);
break;
}
} catch (Exception e) { 
%>
exception: <%= e %>
<%
return;
}
if(!gotMethod){
%>
result: N/A
<%
}
%>
</BODY>
</HTML>